<?php

namespace Database\Seeders;

use App\Models\Permissions;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class PermissionsSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('permissions')->insert([
            [
                'name' => '文章管理',
                'is_menu' => '1',
                'order' => '1',
                'front_router' => 'article',
                'alias' => 'article',
                'template_address' => 'admin/article',
                'back_api' => null,
                'description' => '文章管理',
                'icon' => 'icon-16gl-A',
                'parent_id' => null,
            ],
            [
                'name' => '文章列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/list',
                'description' => '文章列表',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article',
                'description' => '文章详情',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章搜索',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/search',
                'description' => '文章搜索',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/add',
                'description' => '文章添加',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章图片上传',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/add_image',
                'description' => '文章图片上传',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章视频上传',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/add_video',
                'description' => '文章视频上传',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/update',
                'description' => '文章修改',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '文章删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/delete',
                'description' => '文章删除',
                'icon' => null,
                'parent_id' => 1,
            ],
            [
                'name' => '分类管理',
                'is_menu' => '1',
                'order' => '2',
                'front_router' => 'category',
                'alias' => 'category',
                'template_address' => 'admin/category',
                'back_api' => null,
                'description' => '文章管理',
                'icon' => 'icon-16gl-C',
                'parent_id' => null,
            ],
            [
                'name' => '分类列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/category/list',
                'description' => '分类列表',
                'icon' => null,
                'parent_id' => 10,
            ],
            [
                'name' => '分类详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/category',
                'description' => '分类详情',
                'icon' => null,
                'parent_id' => 10,
            ],
            [
                'name' => '分类添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/category/add',
                'description' => '分类添加',
                'icon' => null,
                'parent_id' => 10,
            ],
            [
                'name' => '分类修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/category/update',
                'description' => '分类修改',
                'icon' => null,
                'parent_id' => 10,
            ],
            [
                'name' => '分类删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/category/delete',
                'description' => '分类删除',
                'icon' => null,
                'parent_id' => 10,
            ],
            [
                'name' => '标签管理',
                'is_menu' => '1',
                'order' => '3',
                'front_router' => 'tag',
                'alias' => 'tag',
                'template_address' => 'admin/tag',
                'back_api' => null,
                'description' => '标签管理',
                'icon' => 'icon-16gl-T',
                'parent_id' => null,
            ],
            [
                'name' => '全部标签',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/tag/all',
                'description' => '全部标签',
                'icon' => null,
                'parent_id' => 16,
            ],
            [
                'name' => '标签列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/tag/list',
                'description' => '标签列表',
                'icon' => null,
                'parent_id' => 16,
            ],
            [
                'name' => '标签详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/tag',
                'description' => '标签详情',
                'icon' => null,
                'parent_id' => 16,
            ],
            [
                'name' => '标签添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/tag/add',
                'description' => '标签添加',
                'icon' => null,
                'parent_id' => 16,
            ],
            [
                'name' => '标签修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/tag/update',
                'description' => '标签修改',
                'icon' => null,
                'parent_id' =>16,
            ],
            [
                'name' => '标签删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/tag/delete',
                'description' => '标签删除',
                'icon' => null,
                'parent_id' => 16,
            ],
            [
                'name' => '评论管理',
                'is_menu' => '1',
                'order' => '4',
                'front_router' => 'comment',
                'alias' => 'comment',
                'template_address' => 'admin/comment',
                'back_api' => null,
                'description' => '评论管理',
                'icon' => 'icon-16gl-C',
                'parent_id' => null,
            ],
            [
                'name' => '评论搜索',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/comment/search',
                'description' => '评论搜索',
                'icon' => null,
                'parent_id' => 23,
            ],
            [
                'name' => '评论列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/comment/list',
                'description' => '评论列表',
                'icon' => null,
                'parent_id' => 23,
            ],
            [
                'name' => '添加评论',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/comment/add',
                'description' => '添加评论',
                'icon' => null,
                'parent_id' => 23,
            ],
            [
                'name' => '删除评论',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/article/comment/delete',
                'description' => '删除评论',
                'icon' => null,
                'parent_id' => 23,
            ],
            [
                'name' => '附件管理',
                'is_menu' => '1',
                'order' => '5',
                'front_router' => 'file',
                'alias' => 'file',
                'template_address' => 'admin/file',
                'back_api' => null,
                'description' => '附件管理',
                'icon' => 'icon-16gl-C',
                'parent_id' => null,
            ],
            [
                'name' => '附件列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/file',
                'description' => '附件列表',
                'icon' => null,
                'parent_id' => 28,
            ],
            [
                'name' => '上传附件',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/file/upload',
                'description' => '上传附件',
                'icon' => null,
                'parent_id' => 28,
            ],
            [
                'name' => '删除附件',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/file/delete',
                'description' => '删除附件',
                'icon' => null,
                'parent_id' => 28,
            ],
            [
                'name' => '系统管理',
                'is_menu' => '1',
                'order' => '6',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => null,
                'description' => '系统管理',
                'icon' => 'icon-16gl-S',
                'parent_id' => null,
            ],
            [
                'name' => '后台用户',
                'is_menu' => '1',
                'order' => '1',
                'front_router' => 'back/user',
                'alias' => 'backUser',
                'template_address' => 'admin/admin',
                'back_api' => null,
                'description' => '后台用户',
                'icon' => 'icon-16gl-A',
                'parent_id' => 32,
            ],
            [
                'name' => '管理员列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/admin/user/list',
                'description' => '管理员列表',
                'icon' => null,
                'parent_id' => 33,
            ],
            [
                'name' => '管理员详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/admin/user',
                'description' => '管理员详情',
                'icon' => null,
                'parent_id' => 33,
            ],
            [
                'name' => '管理员添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/admin/user/add',
                'description' => '管理员添加',
                'icon' => null,
                'parent_id' => 33,
            ],
            [
                'name' => '管理员修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/admin/user/update/data',
                'description' => '管理员修改',
                'icon' => null,
                'parent_id' => 33,
            ],
            [
                'name' => '管理员头像上传',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/admin/user/update/avatar',
                'description' => '管理员头像上传',
                'icon' => null,
                'parent_id' => 33,
            ],
            [
                'name' => '管理员删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/admin/user/delete',
                'description' => '管理员删除',
                'icon' => null,
                'parent_id' => 33,
            ],
            [
                'name' => '前台用户',
                'is_menu' => '1',
                'order' => '2',
                'front_router' => 'front/user',
                'alias' => 'frontUser',
                'template_address' => 'admin/user',
                'back_api' => null,
                'description' => '前台用户',
                'icon' => 'icon-16gl-U',
                'parent_id' => 32,
            ],
            [
                'name' => '用户搜索',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user/search',
                'description' => '用户搜索',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '用户列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user/list',
                'description' => '用户列表',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '用户详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user',
                'description' => '用户详情',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '用户添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user/add',
                'description' => '用户添加',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '用户修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user/update',
                'description' => '用户修改',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '用户头像上传',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user/update/avatar',
                'description' => '用户头像上传',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '用户删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/user/delete',
                'description' => '用户删除',
                'icon' => null,
                'parent_id' => 40,
            ],
            [
                'name' => '角色管理',
                'is_menu' => '1',
                'order' => '3',
                'front_router' => 'role',
                'alias' => 'role',
                'template_address' => 'admin/role',
                'back_api' => null,
                'description' => '角色管理',
                'icon' => 'icon-16gl-R',
                'parent_id' => 32,
            ],
            [
                'name' => '角色列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/role/list',
                'description' => '角色列表',
                'icon' => null,
                'parent_id' => 48,
            ],
            [
                'name' => '角色详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/role',
                'description' => '角色详情',
                'icon' => null,
                'parent_id' => 48,
            ],
            [
                'name' => '角色添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/role/add',
                'description' => '角色添加',
                'icon' => null,
                'parent_id' => 48,
            ],
            [
                'name' => '角色修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/role/update',
                'description' => '角色修改',
                'icon' => null,
                'parent_id' => 48,
            ],
            [
                'name' => '角色删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/role/delete',
                'description' => '角色删除',
                'icon' => null,
                'parent_id' => 48,
            ],
            [
                'name' => '权限管理',
                'is_menu' => '1',
                'order' => '4',
                'front_router' => 'permission',
                'alias' => 'permission',
                'template_address' => 'admin/permission',
                'back_api' => null,
                'description' => '权限管理',
                'icon' => 'icon-16gl-P',
                'parent_id' => 32,
            ],
            [
                'name' => '权限列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/permission/list',
                'description' => '权限列表',
                'icon' => null,
                'parent_id' => 54,
            ],
            [
                'name' => '权限详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/permission',
                'description' => '权限详情',
                'icon' => null,
                'parent_id' => 54,
            ],
            [
                'name' => '权限添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/permission/add',
                'description' => '权限添加',
                'icon' => null,
                'parent_id' => 54,
            ],
            [
                'name' => '权限修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/permission/update',
                'description' => '权限修改',
                'icon' => null,
                'parent_id' => 54,
            ],
            [
                'name' => '权限删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/permission/delete',
                'description' => '权限删除',
                'icon' => null,
                'parent_id' => 54,
            ],
            [
                'name' => '网站配置',
                'is_menu' => '1',
                'order' => '7',
                'front_router' => 'config',
                'alias' => 'config',
                'template_address' => 'admin/config',
                'back_api' => null,
                'description' => '网站配置',
                'icon' => 'icon-16gl-W',
                'parent_id' => null,
            ],
            [
                'name' => '网站配置详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/config',
                'description' => '网站配置详情',
                'icon' => null,
                'parent_id' => 60,
            ],
            [
                'name' => '网站配置修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/config/update',
                'description' => '网站配置修改',
                'icon' => null,
                'parent_id' => 60,
            ],
            [
                'name' => '网站LOGO上传',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/config/update/logo',
                'description' => '网站LOGO上传',
                'icon' => null,
                'parent_id' => 60,
            ],
            [
                'name' => '评论关键字',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/config/comment',
                'description' => '评论关键字',
                'icon' => null,
                'parent_id' => 60,
            ],
            [
                'name' => '评论关键字设置',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/config/comment/set',
                'description' => '评论关键字设置',
                'icon' => null,
                'parent_id' => 60,
            ],
            [
                'name' => '轮播管理',
                'is_menu' => '1',
                'order' => '8',
                'front_router' => 'banner',
                'alias' => 'banner',
                'template_address' => 'admin/banner',
                'back_api' => null,
                'description' => '轮播管理',
                'icon' => 'icon-16gl-B',
                'parent_id' => null,
            ],
            [
                'name' => '轮播列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/banner/list',
                'description' => '轮播列表',
                'icon' => null,
                'parent_id' => 66,
            ],
            [
                'name' => '轮播详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/banner',
                'description' => '轮播详情',
                'icon' => null,
                'parent_id' => 66,
            ],
            [
                'name' => '轮播添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/banner/add',
                'description' => '轮播添加',
                'icon' => null,
                'parent_id' => 66,
            ],
            [
                'name' => '轮播修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/banner/update',
                'description' => '轮播修改',
                'icon' => null,
                'parent_id' => 66,
            ],
            [
                'name' => '轮播删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/banner/delete',
                'description' => '轮播删除',
                'icon' => null,
                'parent_id' => 66,
            ],
            [
                'name' => '友情链接',
                'is_menu' => '1',
                'order' => '9',
                'front_router' => 'partner',
                'alias' => 'partner',
                'template_address' => 'admin/partner',
                'back_api' => null,
                'description' => '友情链接',
                'icon' => 'icon-16gl-P',
                'parent_id' => null,
            ],
            [
                'name' => '友情链接列表',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/partner/list',
                'description' => '友情链接列表',
                'icon' => null,
                'parent_id' => 72,
            ],
            [
                'name' => '友情链接详情',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/partner',
                'description' => '友情链接详情',
                'icon' => null,
                'parent_id' => 72,
            ],
            [
                'name' => '友情链接添加',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/partner/add',
                'description' => '友情链接添加',
                'icon' => null,
                'parent_id' => 72,
            ],
            [
                'name' => '友情链接修改',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/partner/update',
                'description' => '友情链接修改',
                'icon' => null,
                'parent_id' => 72,
            ],
            [
                'name' => '友情链接删除',
                'is_menu' => '0',
                'order' => '10',
                'front_router' => null,
                'alias' => null,
                'template_address' => null,
                'back_api' => '/back/partner/delete',
                'description' => '友情链接删除',
                'icon' => null,
                'parent_id' => 72,
            ],
        ]);
    }
}
